<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/public.css" />
<head>
<style type="text/css">
    #current a{padding-left: 10px;}
</style>
</head>
<body> 
	<TABLE class="talbe">
		<tr>
			<th width="5%">ID</th>
			<th width="30%">标题</th>
			<th>板块分类</th>
			<th>点击次数</th>
			<th>发布时间</th>
			<th>操作</th>
		</tr>
		<?php if(is_array($blog)): foreach($blog as $key=>$v): ?><tr>
        	<td><?php echo ($v["id"]); ?></td>
        	<td>
        	  <a href="<?php echo U('/'.$v['id']);?>"><?php echo ($v["title"]); ?></a>
              <?php if(is_array($v["attr"])): foreach($v["attr"] as $key=>$value): ?><span style="color:<?php echo ($value["color"]); ?>;border:1px solid <?php echo ($value["color"]); ?>;margin-left:5px;"><?php echo ($value["name"]); ?></span><?php endforeach; endif; ?>
        	</td>
        	<td><?php echo ($v["cate"]); ?></td>
        	<td><?php echo ($v["click"]); ?></td>
        	<td><?php echo (date('Y-m-d H:m',$v["time"])); ?></td>
        	<td>
        	    <?php if($v["del"] == 0): ?><a href="<?php echo U(GROUP_NAME.'/Blog/ToRecycle',array('id'=>$v['id'],'type'=>1));?>">[移到回收站]</a>
        	       <a href="#">[修改]</a>
                <?php else: ?>
                   <a href="<?php echo U(GROUP_NAME.'/Blog/ToRecycle',array('id'=>$v['id'],'type'=>0));?>">[还原]</a>
                   <a href="<?php echo U(GROUP_NAME.'/Blog/Del',array('id'=>$v['id']));?>">[彻底删除]</a><?php endif; ?>
            </td>
        </tr><?php endforeach; endif; ?>
        <tr>
            <td colspan='6'><?php echo ($page); ?></td>
        </tr>
	</TABLE>
</body>
</html>